home *** CD-ROM | disk | FTP | other *** search
- //
- // The Fusion Library Interface for DOS
- // Version 1.06c
- // Copyright (C) 1990, 1991, 1992
- // Software Dimensions
- //
- // MenuControl --> MenuItems --> FusionWindow
- //
-
- #include "fliwin.h"
- #include "colors.h"
-
- #ifdef __BCPLUSPLUS__
- #pragma hdrstop
- #endif
-
- #include <string.h>
-
- //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- //
- // SetMenuBar()
- //
- // Anchors the menu bar
- //
- //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
- int MenuManager::SetMenuBar(int X,int Y,int Width,void far *Memory)
- {
- BlazeClass Blaze;
-
- if (Memory)
- Blaze.UseMemory(Memory);
-
- SetX=X;
- SetY=Y;
- StowedWidth=Width;
-
- Blaze.CharacterRepeater(X,Y,Width,Colors.MenuBarNormal,' ');
-
- for (int i=0,j=1;i<NumberOfMenus;i++)
- {
- Blaze.QuickDisplay(X+j,Y,Colors.MenuBarBold,Colors.MenuBarNormal,
- Menus[i]->Title);
- Menus[i]->XStart=X+j-1;
- j+=(strlen(Menus[i]->Title)+1);
- if (!strchr(Menus[i]->Title,'~'))
- j++;
- Menus[i]->XEnd=X+j-2;
- }
-
- return (X+j+1)-X;
- }
-
-